Skip to content

Allow creating snapshot from VM snapshot#4739

Merged
nvazquez merged 1 commit intoapache:mainfrom
ravening:kvm-vm-snapshot
Apr 14, 2022
Merged

Allow creating snapshot from VM snapshot#4739
nvazquez merged 1 commit intoapache:mainfrom
ravening:kvm-vm-snapshot

Conversation

@ravening
Copy link
Copy Markdown
Member

@ravening ravening commented Mar 1, 2021

Description

If kvm.snapshot.enabled is set to false then we cant create snapshot from
VM snapshot. With this change, its possible to create snapshot from VM
snapshot even when the global setting is set to false.
Note that you still cant directly create a snapshot from volume though

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

@DaanHoogland
Copy link
Copy Markdown
Contributor

I am struggling to see the use-case. Can you explain why you want this, @ravening?

@ravening
Copy link
Copy Markdown
Member Author

ravening commented Mar 1, 2021

I am struggling to see the use-case. Can you explain why you want this, @ravening?

@DaanHoogland

sometimes we need to create a template or volume from snapshot. If the global setting is false then we cant create snapshot and hence we cant create template also. But with this change, we are able to create those

@DaanHoogland
Copy link
Copy Markdown
Contributor

so if you want to create a template from a vm-snapshot you need to first create a volume snapshot from it, tnx @ravening .

@weizhouapache
Copy link
Copy Markdown
Member

I am struggling to see the use-case. Can you explain why you want this, @ravening?

for stopped vms, we can create volume snapshot no matter if kvm.snapshot.enabled is true or false.

for running vms, if kvm.snapshot.enabled is false, we cannot create volume snapshot
if kvm.snapshot.enabled is true, we can create volume snapshot by following steps in cloudstack if image is qcow2 format.
(1) create vm snapshot (vm will be paused)
(2) create volume snapshot from the vm snapshot

If we already have a vm snapshot, even if kvm.snapshot.enabled is false, we should be able to create volume snapshot from vmsnapshot (step 2 above), as vm will not be paused and vm image will not be touched.

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Mar 24, 2021

@weizhouapache @ravening any update on this?

@ravening
Copy link
Copy Markdown
Member Author

@weizhouapache @ravening any update on this?

not sure what update is needed here @rhtyd

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✔️ centos7 ✔️ centos8 ✔️ debian. SL-JID 243

@DaanHoogland
Copy link
Copy Markdown
Contributor

me neither @rhtyd are you missing something here?

Copy link
Copy Markdown
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code looks good, any marvin or other test automation @ravening ?

@ravening
Copy link
Copy Markdown
Member Author

code looks good, any marvin or other test automation @ravening ?

@DaanHoogland didnt think of writing any automation test cases.. tested it manually

@DaanHoogland
Copy link
Copy Markdown
Contributor

loads of travis errors @ravening , can you have a look?

@Pearl1594
Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@Pearl1594 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✔️ centos7 ✔️ centos8 ✔️ debian. SL-JID 297

@Pearl1594
Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

@Pearl1594 a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-307)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 42949 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4739-t307-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_clusters.py
Intermittent failure detected: /marvin/tests/smoke/test_list_ids_parameter.py
Intermittent failure detected: /marvin/tests/smoke/test_snapshots.py
Intermittent failure detected: /marvin/tests/smoke/test_ssvm.py
Intermittent failure detected: /marvin/tests/smoke/test_usage.py
Intermittent failure detected: /marvin/tests/smoke/test_vm_life_cycle.py
Smoke tests completed. 81 look OK, 5 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_04_deploy_and_scale_kubernetes_cluster Failure 3643.50 test_kubernetes_clusters.py
ContextSuite context=TestKubernetesCluster>:teardown Error 70.61 test_kubernetes_clusters.py
ContextSuite context=TestListIdsParams>:setup Error 0.00 test_list_ids_parameter.py
test_01_snapshot_root_disk Error 0.04 test_snapshots.py
test_02_list_snapshots_with_removed_data_store Error 11.85 test_snapshots.py
test_01_snapshot_usage Error 0.04 test_usage.py
test_01_migrate_VM_and_root_volume Error 67.16 test_vm_life_cycle.py
test_02_migrate_VM_with_two_data_disks Error 50.07 test_vm_life_cycle.py

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Apr 4, 2021

@ravening pl check snapshot related failures

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Apr 15, 2021

Re-ping @ravening

@ravening
Copy link
Copy Markdown
Member Author

Re-ping @ravening

@rhtyd will look into it in few days.. kind of busy with some other work

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Apr 16, 2021

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@ravening
Copy link
Copy Markdown
Member Author

@Pearl1594 if possible can you run the test again?

@Pearl1594
Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@Pearl1594 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian. SL-JID 681

@Pearl1594
Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

@Pearl1594 a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-1405)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 52774 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4739-t1405-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_clusters.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py
Smoke tests completed. 88 look OK, 1 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_02_deploy_and_upgrade_kubernetes_cluster Failure 3603.54 test_kubernetes_clusters.py
test_03_deploy_and_scale_kubernetes_cluster Failure 3606.89 test_kubernetes_clusters.py
test_04_basic_lifecycle_kubernetes_cluster Failure 0.06 test_kubernetes_clusters.py
test_05_delete_kubernetes_cluster Failure 0.06 test_kubernetes_clusters.py
test_07_deploy_kubernetes_ha_cluster Failure 0.06 test_kubernetes_clusters.py
test_08_deploy_and_upgrade_kubernetes_ha_cluster Failure 0.05 test_kubernetes_clusters.py
test_09_delete_kubernetes_ha_cluster Failure 0.06 test_kubernetes_clusters.py
ContextSuite context=TestKubernetesCluster>:teardown Error 87.86 test_kubernetes_clusters.py

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Sep 21, 2021

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 1339

Copy link
Copy Markdown
Member

@weizhouapache weizhouapache left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code lgtm

@weizhouapache
Copy link
Copy Markdown
Member

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

@weizhouapache a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-2147)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 39298 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4739-t2147-kvm-centos7.zip
Smoke tests completed. 84 look OK, 5 have errors
Only failed tests results shown below:

Test Result Time (s) Test File
test_01_add_primary_storage_disabled_host Error 0.61 test_primary_storage.py
test_01_primary_storage_nfs Error 0.12 test_primary_storage.py
ContextSuite context=TestStorageTags>:setup Error 0.21 test_primary_storage.py
test_01_secure_vm_migration Error 164.38 test_vm_life_cycle.py
test_02_unsecure_vm_migration Error 274.29 test_vm_life_cycle.py
test_03_secured_to_nonsecured_vm_migration Error 146.94 test_vm_life_cycle.py
test_08_migrate_vm Error 43.72 test_vm_life_cycle.py
test_02_list_snapshots_with_removed_data_store Error 1.18 test_snapshots.py
test_03_deploy_and_scale_kubernetes_cluster Failure 30.92 test_kubernetes_clusters.py
test_07_deploy_kubernetes_ha_cluster Failure 67.74 test_kubernetes_clusters.py
test_08_deploy_and_upgrade_kubernetes_ha_cluster Failure 61.81 test_kubernetes_clusters.py
test_09_delete_kubernetes_ha_cluster Failure 0.06 test_kubernetes_clusters.py
ContextSuite context=TestKubernetesCluster>:teardown Error 81.58 test_kubernetes_clusters.py
test_hostha_enable_ha_when_host_in_maintenance Error 304.89 test_hostha_kvm.py

@ravening
Copy link
Copy Markdown
Member Author

@DaanHoogland @weizhouapache ran the tests again in my setup and these didnt fail

If `kvm.snapshot.enabled` is set to false then we cant create snapshot from
VM snapshot. With this change, its possible to create snapshot from VM
snapshot even when the global setting is set to false.
Note that you still cant directly create a snapshot from volume though
@DaanHoogland
Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@DaanHoogland a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 3140

@DaanHoogland
Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-3869)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 33243 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4739-t3869-kvm-centos7.zip
Smoke tests completed. 93 look OK, 0 have errors
Only failed tests results shown below:

Test Result Time (s) Test File

@nvazquez nvazquez added this to the 4.17.0.0 milestone Apr 13, 2022
@nvazquez nvazquez merged commit c794127 into apache:main Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

8 participants